<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:import href="../utilities/master-calendar.xsl"/>
<xsl:import href="../utilities/date-and-time.xsl"/>

<xsl:template match="data">
	<xsl:param name="client-id" select="/data/client-profile/entry/@id"/>
	
	<div class="grid_16">
		<div class="grid_5 alpha">
			<h4>Current Information</h4>
			<ul>
				<li>
					<label><em>First Name: </em> <xsl:value-of select="/data/client-profile/entry/first-name"/></label>
				</li>
				<li>
					<label><em>Last Name: </em> <xsl:value-of select="/data/client-profile/entry/last-name"/></label>
				</li>
				<li>
					<label><em>Email/Username: </em> <xsl:value-of select="/data/client-profile/entry/email-address"/></label>
				</li>
				<li>
					<label>
						<em>Password: </em>
						<strong id="pw_no">******</strong>
						<strong id="pw_yes" style="display:none;">
							<xsl:value-of select="/data/client-profile/entry/client-password"/>
						</strong>
						<xsl:text> </xsl:text>
						<strong id="pw_toggle">(show)</strong>
					</label>
				</li>
				<xsl:if test="/data/client-profile/entry/client-home-phone != ''">
					<li>
						<label><em>Home Phone: </em> <xsl:value-of select="/data/client-profile/entry/client-home-phone"/></label>
					</li>
				</xsl:if>
				<xsl:if test="/data/client-profile/entry/client-mobile-phone != ''">
					<li>
						<label><em>Mobile Phone: </em> <xsl:value-of select="/data/client-profile/entry/client-mobile-phone"/></label>
					</li>
				</xsl:if>
				<li>
					<label><em>Account Status: </em> <xsl:value-of select="/data/client-profile/entry/client-status/item"/></label>
				</li>
			</ul>
		</div>
		<div class="grid_9 omega">
			<h2>Update Client Profile</h2>
			
			<xsl:if test="//edit-profile/@result = 'success'">
				<h5 class="success">
					<xsl:value-of select="//edit-profile/message"/>
				</h5>
			</xsl:if>
			
			<xsl:if test="//edit-profile/@result = 'error'">
				<h5 class="error">
					<xsl:value-of select="//edit-profile/message"/>
					<xsl:text> </xsl:text>
					<!--xsl:value-of select="//edit-profile/field-name/"/-->
				</h5>
			</xsl:if>
			
			<p>In order for us to maintain accurate records you are permitted to change only the following profile information.</p>
			
			<form method="post" action="" enctype="multipart/form-data">
				<input name="MAX_FILE_SIZE" type="hidden" value="5242880" />
				<input name="id" type="hidden" value="{/data/client-profile/entry/@id}" />
				<label>Password:
					<input name="fields[client-password]" type="password" value="{/data/client-profile/entry/client-password}" id="pw_{/data/client-profile/entry/@id}" />
				</label>
				<label>Home Phone Number:
					<input name="fields[client-home-phone]" type="text" value="{/data/client-profile/entry/client-mobile-phone}" />
				</label>
				<label>Mobile Phone Number:
					<input name="fields[client-mobile-phone]" type="text" value="{/data/client-profile/entry/client-home-phone}" />
				</label>
				<input name="action[edit-profile]" type="submit" value="Update Profile" />
			</form>
			
		</div>
	</div>
	<!--xsl:param name="tomorrow">
		<xsl:call-template name="next-day">
			<xsl:with-param name="date" select="$today"/>
		</xsl:call-template>
	</xsl:param-->
	
</xsl:template>

</xsl:stylesheet>